package com.unitd.springboot.starter.scheduler;

import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * @desc frame-scheduler 框架设计的基础属性配置对象信息
 * 用于定义frame-scheduler框架中需要使用的一些基础的默认的属性对象信息
 * 其中定时任务的属性配置key以 unitd.scheduler 作为前缀
 * 此类相当于springMVC环境下spring-schduler.xml文件中的定义的相关配置信息也可以与frame-scheduler工程中的SchedulerFactoryBeanWrapper类对应起来
 * spring-schduler
 * @filename SchedulerProperties.java
 * @author Hudan
 * @version 1.0
 * @copyright www.unitd.com
 * @date 2017/12/23
 */
@ConfigurationProperties(prefix = "unitd.scheduler")
public class SchedulerProperties {

	/** 注册中心类型(默认为zookeeper) */
	private String registryType = "zookeeper";
	/** 注册中心的服务地址 */
	private String registryServers;
	/** 定时任务所在组群, 确保每个应用groupName唯一 */
	private String groupName;
	/** 需要扫描的包路径(扫描该包下是否有ScheduleConf注解的类,有该注解的类也是定时任务) */
	private String scanPackages;
	/** 线程池大小 */
	private int threadPoolSize;

	public String getRegistryType() {
		return registryType;
	}

	public void setRegistryType(String registryType) {
		this.registryType = registryType;
	}

	public String getRegistryServers() {
		return registryServers;
	}

	public void setRegistryServers(String registryServers) {
		this.registryServers = registryServers;
	}

	public String getGroupName() {
		return groupName;
	}

	public void setGroupName(String groupName) {
		this.groupName = groupName;
	}

	public String getScanPackages() {
		return scanPackages;
	}

	public void setScanPackages(String scanPackages) {
		this.scanPackages = scanPackages;
	}

	public int getThreadPoolSize() {
		return threadPoolSize;
	}

	public void setThreadPoolSize(int threadPoolSize) {
		this.threadPoolSize = threadPoolSize;
	}
}